A Hadamard transform technique is a common technique applied to image compression. In the prior art, when a forward Hadamard transform (mentioned as a Hadamard transform in the following description) is performed on an image (i.e., a statistic frame), eight pixels in a same scan line forms an image block unit, and an 8×1 matrix generated from multiplying an eight-stage (i.e., 8×8) Hadamard matrix with the eight pixel values is frequency transformed. The eight matrix elements of the 8×1 matrix are transformed values calculated as:
                                          H            8                    *                      P            ⁡                          [              8              ]                                      =                                            [                                                                    1                                                        1                                                        1                                                        1                                                        1                                                        1                                                        1                                                        1                                                                                        1                                                        1                                                        1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                                                  -                      1                                                                                                  -                      1                                                                                                            1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                                                  -                      1                                                                                                  -                      1                                                                            1                                                        1                                                                                        1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                                                            1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                        1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                                                        1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                                              -                      1                                                                            1                                                        1                                                                              -                      1                                                                                                            1                                                                              -                      1                                                                            1                                                                              -                      1                                                                                                  -                      1                                                                            1                                                                              -                      1                                                                            1                                                                                        1                                                                              -                      1                                                                            1                                                                              -                      1                                                                            1                                                                              -                      1                                                                            1                                                                              -                      1                                                                                  ]                        ⁡                          [                                                                                          P                      ⁢                                                                                          ⁢                      0                                                                                                                                  P                      ⁢                                                                                          ⁢                      1                                                                                                                                  P                      ⁢                                                                                          ⁢                      2                                                                                                                                  P                      ⁢                                                                                          ⁢                      3                                                                                                                                  P                      ⁢                                                                                          ⁢                      4                                                                                                                                  P                      ⁢                                                                                          ⁢                      5                                                                                                                                  P                      ⁢                                                                                          ⁢                      6                                                                                                                                  P                      ⁢                                                                                          ⁢                      7                                                                                  ]                                =                      [                                                            DC                                                                                                  AC                    ⁢                                                                                  ⁢                    0                                                                                                                    AC                    ⁢                                                                                  ⁢                    1                                                                                                                    AC                    ⁢                                                                                  ⁢                    2                                                                                                                    AC                    ⁢                                                                                  ⁢                    3                                                                                                                    AC                    ⁢                                                                                  ⁢                    4                                                                                                                    AC                    ⁢                                                                                  ⁢                    5                                                                                                                    AC                    ⁢                                                                                  ⁢                    6                                                                        ]                                              (        1        )            
In Equation 1, H8 is the eight-stage Hadamard matrix, P[8] is the 8×1 matrix formed by eight pixels P0 to P7, H8*P[8] is an 8×1 matrix comprising eight transformed values, i.e., one direct current (DC) value and seven alternating current (AC) values AC0 to AC6, where the DC value represents an average of the eight pixels P0 to P7, and AC0 to AC6 represents in sequence low-frequency components to high-frequency components. After the Hadamard transformed is performed, the transformed values are quantized, i.e., several least significant bits (LSBs) of the transformed values are abandoned to reduce bits and thereby achieving an object of image compression.
One advantage of the Hadamard transform is that, when an Hadamard inverse transform is performed, an inverse Hadamard matrix is the Hadamard matrix for the previous positive transform. For Equation 1, when H8−1 represents an inverse matrix of H8, H8−1 is equal to H8. Another advantage of the Hadamard transform is that only simple addition and subtraction are performed in the Hadamard inverse transform as seen from Equation 1.
Due to the foregoing advantages of the Hadamard transform, an image compression circuit based on the Hadamard transform has better flexibility and higher efficiency to achieve better image compression effect.